import React, { Component } from 'react'
import {Route, NavLink} from 'react-router-dom';
import News from '../News';
import Message from '../Message';
import "./index.css"
export default class Home extends Component {
    render() {
        return (
            <div className="col-xs-6">
                <div className="panel">
                    <div className="panel-body">
                        <h3>我是 Home 的内容</h3>
                        <hr />
                        <ul className="nav nav-pills">
                            <li role="presentation">
                                <NavLink to="/home/news">新闻</NavLink>    
                            </li>
                            <li role="presentation">
                                <NavLink to="/home/message">信息</NavLink>
                            </li>
                        </ul>
                        <hr />
                        
                        <Route path="/home/news" component={News} />
                        <Route path="/home/message" component={Message} />

                        
                    </div>
                </div>
            </div>
        )
    }

    componentDidMount(){
        console.log(this.props);
    }
}
